<link rel="stylesheet" href="{{URL::asset('./css/suppliermy/menu.css')}}">
<div class="main" id="supplierMenu">
    <div class="hrMenu_header">
        <div class="hrMenu_header_content">
            <img :src="userInfo.avatar">
            <span>@{{userInfo.username}}</span>
            <div class="myBind">
                <p>
                    <span :class="{active:userInfo.is_wechat==0}">
                        <a href="{{route('home.suppliermy.supplierSafeWeixin') }}">
                            <img src="{{URL::asset('./img/icon/myWx.png')}}">
                            <span v-if="userInfo.is_wechat==1">已绑定</span>
                            <span v-else>未绑定</span>
                        </a>
                    </span>
                    <span :class="{active:userInfo.is_qq==0}">
                        <a href="{{route('home.suppliermy.supplierSafeQQ') }}">
                            <img src="{{URL::asset('./img/icon/myQq.png')}}">
                            <span v-if="userInfo.is_qq==1">已绑定</span>
                            <span v-else>未绑定</span></a>
                    </span>
                </p>
                <p>
                    <span :class="{active:userInfo.is_mobile==0}">
                        <a href="{{route('home.suppliermy.supplierSafePhone') }}">
                            <img src="{{URL::asset('./img/icon/myTel.png')}}">
                            <span v-if="userInfo.is_mobile==1">已绑定</span>
                            <span v-else>未绑定</span>
                        </a>
                    </span>
                    <span :class="{active:userInfo.is_password==0}">
                        <a href="{{route('home.suppliermy.supplierSafePass') }}">
                            <img src="{{URL::asset('./img/icon/mySetting.png')}}">
                            <span v-if="userInfo.is_password==1">已绑定</span>
                            <span v-else>未绑定</span>
                        </a>
                    </span>
                </p>
            </div>
        </div>
        <div class="s-footer"></div>
    </div>
    <div class="hrMenu_menu">
        <div class="hrMenu_menu_content">
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">账户管理</a>
                    <div>
                        <p><a :class="{active:showNab=='supplierinfoedit' || showNab=='supplierinfo'}" href="{{route('home.suppliermy.supplierInfo') }}">基础信息</a></p>
                        <p><a :class="{active:showNab=='suppliersafe' || showNab=='suppliersafepass' || showNab=='suppliersafephone'  || showNab=='suppliersafeweixin' || showNab=='suppliersafeqq'}" href="{{route('home.suppliermy.supplierSafe') }}">安全中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">财务管理</a>
                    <div>
                        <p><a :class="{active:showNab=='supplierassetsinfo' || showNab=='supplierretreatbond' || showNab=='supplierprofit' || showNab=='suppliercashOut' || showNab=='supplierintegrallogs'}" href="{{route('home.suppliermy.supplierAssetsInfo') }}">财务管理中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的投标</a>
                    <div>
                        <p><a :class="{active:showNab=='supplierbidding'}" href="{{route('home.suppliermy.supplierBidding') }}">竞标管理中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的活动</a>
                    <div>
                        <p><a :class="{active:showNab=='supplieract'}" href="{{route('home.suppliermy.supplierAct') }}">活动管理中心</a></p>
                        <p><a href="{{route('home.activity.actAdd') }}">发布活动</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的店铺</a>
                    <div>
                        <p><a :class="{active:showNab=='supplierstore' || showNab=='supplierstoreedit'}" href="{{route('home.suppliermy.supplierStore') }}">店铺管理中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">我的商品</a>
                    <div>
                        <p><a :class="{active:showNab=='suppliergoods'}" href="{{route('home.suppliermy.supplierGoods') }}">商品管理中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">
                        站内消息<span>(@{{userInfo.massage}})</span>
                    </a>
                    <div>
                        <p><a :class="{active:showNab=='suppliermail'}" href="{{route('home.suppliermy.supplierMail') }}">消息查看中心</a></p>
                    </div>
                </span>
            </div>
            <div>
                <span></span>
                <span class="titleName">
                    <a href="">
                        投诉建议
                    </a>
                    <div>
                        <p><a :class="{active:showNab=='supplierfeedback'||showNab=='supplierfeedbackadd'||showNab=='supplierfeedbackdetails'}" href="{{route('home.suppliermy.supplierFeedBack') }}">投诉与建议</a></p>
                        <p><a :class="{active:showNab=='suppliercustomerservice'}" href="{{route('home.suppliermy.supplierCustomerService') }}">联系客服</a></p>
                    </div>
                </span>
            </div>
        </div>
        <div class="s-header"></div>
    </div>
</div>
@section('scripts')
<script>
    $(() => {
        let supplierMenu = new Vue({
            el: '#supplierMenu',
            data: () => {
                return {
                    showNab: "",
                    userInfo: {},
                }
            },
            created() {
                let pathnameArr = window.location.pathname.split('/');
                this.showNab = pathnameArr[(pathnameArr.length - 1)];
                let data = {}
                apiAjax("{{ route('home.user.userInfoApi')}}", 'get', data, (res) => {
                    if (res.code == 0) {
                        this.userInfo = res.data;

                    } else {
                        this.$message({
                            message: res.msg,
                            type: 'warning'
                        });
                    }
                }, (erro) => {

                });
            },
            mounted() {},
            methods: {}
        })
    })
</script>
@endsection